﻿using Glimpse.Core.Extensibility;
using System.Collections.Generic;

namespace GlimpseWcf.Server
{
    public class WcfDataStore : IDataStore
    {
        private static readonly Dictionary<string, object> DataStoreDictionary = new Dictionary<string,object>();

        public bool Contains(string key)
        {
            return DataStoreDictionary.ContainsKey(key);
        }

        public object Get(string key)
        {
            return DataStoreDictionary.ContainsKey(key) ? DataStoreDictionary[key] : null;
        }

        public void Set(string key, object value)
        {
            DataStoreDictionary[key] = value;
        }
    }
}